/**
 * 添加和编辑页面js
 */
var common_vali_form = function() {
	"use strict";
	
	var dataVali = function (form, isBack){
		var errorCount = platform_verify.formVali(form);
		if(errorCount != 0){
			toastr.warning("有" + errorCount + "处错误，请修正！");
	 		return false;
		}
		if (isBack) {
			common_ajax.submitForm("editForm", function () {
				common_vali_form.bottomBack();
			});
		} else {
			common_ajax.submitForm("editForm");
		}
	};
	
	return {
		submitValiFunc: dataVali,
		bottomBack:     bottomBack,
		splitPageFlash:     splitPageFlash 
	};
	
}();
